package com.xinyuan.trade.Fragment;

import android.content.res.Resources;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xinyuan.trade.R;

/**
 * 设置
 * @author daiy
 *
 */
public class SettingFragment extends BaseFragment implements OnClickListener {

	private Resources resources;
	private RelativeLayout layout_top;
	private TextView tv_top;
	private RelativeLayout layout_setting_checkversion;
	private RelativeLayout layout_setting_softwareshare;
	private RelativeLayout layout_setting_setting_feedback;
	private RelativeLayout layout_setting_cacheclean;
	private RelativeLayout layout_setting_help;
	
	@Override
	public View onCreateView(LayoutInflater inflater,
			@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
		View v = inflater.inflate(R.layout.fragment_setting, container, false);

		resources = getResources();
		
		initView(v);

		return v;
	}
	
	private void initView(View v) {
		layout_top = (RelativeLayout) v.findViewById(R.id.layout_top);
		uiAdapter.setMargin(layout_top, LayoutParams.MATCH_PARENT, 60, 0, 0, 0, 0);
		
		tv_top = (TextView) v.findViewById(R.id.tv_top);
		uiAdapter.setTextSize(tv_top, 26);
		
		layout_setting_checkversion = (RelativeLayout) v.findViewById(R.id.layout_setting_checkversion);
		layout_setting_checkversion.setOnClickListener(this);
		
		layout_setting_softwareshare = (RelativeLayout) v.findViewById(R.id.layout_setting_softwareshare);
		layout_setting_softwareshare.setOnClickListener(this);
		
		layout_setting_setting_feedback = (RelativeLayout) v.findViewById(R.id.layout_setting_setting_feedback);
		layout_setting_setting_feedback.setOnClickListener(this);
		
		layout_setting_cacheclean = (RelativeLayout) v.findViewById(R.id.layout_setting_cacheclean);
		layout_setting_cacheclean.setOnClickListener(this);
		
		layout_setting_help = (RelativeLayout) v.findViewById(R.id.layout_setting_help);
		layout_setting_help.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.layout_setting_checkversion:
			
			break;
		case R.id.layout_setting_softwareshare:
			
			break;
		case R.id.layout_setting_setting_feedback:
			
			break;
		case R.id.layout_setting_cacheclean:
			
			break;
		case R.id.layout_setting_help:
			
			break;
		default:
			break;
		}
	}
}
